using Game;

namespace SCIENEW {
    /// <summary>
    /// 带有DisplayName, Description的物品方块
    /// </summary>
    public abstract class DefaultItem : ItemBlock {
        public string Category = "Items", Id = string.Empty, Description = string.Empty, DisplayName = string.Empty;

        public DefaultItem(string id) {
            Id = id;
            try{
                DisplayName = LanguageControl.Get("Items", "Names", GetCraftingId());
                Description = LanguageControl.Get("Items", "Descriptions", GetCraftingId());
            }
            catch(NullReferenceException){}
        }
        public override string GetDescription(int value) => Description;

        public override string GetDisplayName(SubsystemTerrain subsystemTerrain, int value) => DisplayName;

        public override string GetCategory(int value) => Category;

        public override string GetCraftingId() => Id;
    }
}